package com.chain.qs.modules.biz.listener;

import com.chain.qs.common.schedule.StartJobs;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:spring-*.xml")
public class TaskMonitorTest {
    @Resource
    private StartJobs taskMonitor;

    @Test
    public void initTask() throws Exception {
        taskMonitor.initTask();
        while (true){
            Thread.currentThread().sleep(1000);
        }
    }

    public StartJobs getTaskMonitor() {
        return taskMonitor;
    }

    public void setTaskMonitor(StartJobs taskMonitor) {
        this.taskMonitor = taskMonitor;
    }
}